
/**
 * 详情页面
 */
$().ready(function() {
    layui.use('form', function() {
        var form = layui.form;
    });
});


function reload() {
    window.location.reload();
}


function sendOrder() {
    var hidOaId = $("#hidOaId").val();
    var index = layer.open({
        type : 2,
        title : '编辑',
        maxmin : true,
        shadeClose : false, // 点击遮罩关闭层
        area : [ '700px', '550px' ],
        content :  ctx + 'module/oa/sendOrder/' + hidOaId // iframe的url
    });
}



function update() {
	var url = ctx + "module/oa/replay";
    $.ajax({
        cache : true,
        type : "POST",
        url : url,
        data : $('#formReplay').serialize(),
        async : false,
        error : function(request) {
            parent.layer.alert("Connection error");
        },
        success : function(data) {
            if (data.code == 0) {
                parent.layer.msg("操作成功");
                parent.reLoad();
                var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
                parent.layer.close(index);
            } else {
                parent.layer.alert(data.msg)
            }
        }
    });
}
